<template>
	<view>
		<uni-data-picker :localdata="items" popup-title="请选择班级" @change="onchange"
			@nodeclick="onnodeclick"></uni-data-picker>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				items: [{
						text: "一年级",
						value: "1-0",
						children: [{
								text: "1.1班",
								value: "1-1"
							},
							{
								text: "1.2班",
								value: "1-2"
							}
						]
					},
					{
						text: "二年级",
						value: "2-0"
					},
					{
						text: "三年级",
						value: "3-0"
					}
				]
			}
		},
		methods: {
			onchange(e) {
				const value = e.detail.value
			},
			onnodeclick(node) {}
		}
	}
</script>